The simplest and most commonly used photographic lighting is a small flash unit attached to the camera - in many models, indeed, it is built into the camera body. Arguably the most successful use of on-camera flash is to combine it with the ambient lighting, and for this reason the most highly evolved camera-flash systems regulate the flash output so that it balances the other light sources.
The most common treatment is to lighten shadows with the flash, such as in back-lit shots in daylight. You can set the shutter-and-aperture exposure combination for the day-lit scene; the flash output is then adjusted so that it is less than would be needed were it the only light source. It is possible, even with a non-automatic flash unit, to calculate this balance, but for any photographer intending to use on-camera flash regularly, it makes much more sense to buy an automated camera and flash that will do this conveniently and instantly.
To an extent, the quality and direction of on-camera flash can be varied, depending on the model (this mostly applies to detachable flash units). The light can be softened a little by placing a diffusing material in front of the flash or by tilting the flash-head upwards to bounce the light off a ceiling (which should be low and white for the technique to work well). An extension sync cable, coiled or not, allows the flash to be aimed from some distance away from the camera, for more definite shadow modeling. To retain full exposure control, this extension should be a dedicated cable.